<#include "../common/header.html">

<body class="skin-blue fixed sidebar-mini" style="height: auto; min-height: 100%;">
<div class="wrapper" style="height: auto; min-height: 100%;">
    <#assign page_tab="score">
    <#assign page_nav="rulelist">
    <#include "../common/system_menu.html">

    <!--右侧内容 开始-->
    <div id="admin_right" class="content-wrapper">
        <div class="breadcrumbs" id="breadcrumbs">
            <ul class="breadcrumb">
                <li>
                    <i class="home-icon fa fa-home"></i>
                    <a href="/admin/index">系统</a>
                </li>
                <li>
                    <a href="/admin/score/list_scorerule">积分规则管理</a>
                </li>
                <li class="active">规则列表</li>
            </ul>
        </div>
        <@fly_scorerulepage p="${p!}">
        <div class="content">
            <form name='right_list' method='post' action='#'>
                <table class="table list-table">
                    <colgroup>
                        <col width="35px" />
                        <col />
                        <col width="120px" />
                    </colgroup>
                    <caption>
                        <a class="btn btn-default" href='/admin/score/add_scorerule'>
                            <i class="fa fa-plus"></i>添加积分规则
                        </a>
                        <a class="btn btn-default" id="selectAll">
                            <i class="fa fa-check"></i>全选
                        </a>
                        <a class="btn btn-default" onclick="delModel({msg:'是否把信息放到回收站内？'});">
                            <i class="fa fa-close"></i>批量删除
                        </a>
                    </caption>
                </table>
                <table class="table list-table">
                    <colgroup>
                        <col width="35px" />
                        <col width="200px" />
                        <col width="250px" />
                        <col width="150px" />
                        <col width="100px" />
                        <col width="120px" />
                        <col />
                    </colgroup>
                    <thead>
                    <tr>
                        <th>选择</th>
                        <th>主题</th>
                        <th>奖励积分</th>
                        <th>说明</th>
                        <th>规则</th>
                        <th>最后更新时间</th>
                        <th>状态</th>
                        <th>操作</th>
                    </tr>
                    </thead>

                    <tbody>
                    <#list rule_page.list as rule>
                    <tr>
                        <td><input name="ruleId" type="checkbox" value="${rule.id}" /></td>
                        <td>${rule.name!}</td>
                        <td>${rule.score!}</td>
                        <td>
                            ${rule.remark!}
                        </td>
                        <td class="word-wrap">
                            <#if rule.type ="day">每天一次<#elseif rule.type ="week">每周一次<#elseif rule.type ="month">每月一次<#elseif rule.type ="year">每年一次<#elseif rule.type ="one">只有一次<#elseif rule.type ="unlimite">不限次数</#if></td>
                        <td class="word-wrap">
                            ${rule.createTime?string('yyyy-MM-dd')}
                        </td>
                        <td>
                            <input data-rule-id="${rule.id!}" type="checkbox"<#if rule.status == 1> checked</#if> class="js-switch bootstrap-switch-mini rule-switch">
                        </td>
                        <td>
                            <a href="/admin/score/update_scorerule/${rule.id}"><i class='fa fa-edit'></i>编辑 </a>
                            <a  data-title="${rule.name!}" data-id="${rule.id}" class="score-delete"> <i class='fa fa-close'></i>删除</a>
                        </td>
                    </tr>
                    </#list>
                    </tbody>
                </table>
                <div class="text-center">
                    <ul class="pagination">
                        ${rule_page.pageNumHtml}
                    </ul>
                </div>
            </form>
        </div>
    </@fly_scorerulepage>
</div>
<!--右侧内容 结束-->

</div>
<script type="text/javascript">seajs.use('config', function(config) {});</script>
</body>
</html>